<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<link rel="stylesheet" type="text/css" href="../../../js/bootstrap-3.3.7-dist/css/bootstrap.min.css" />
		<link rel="stylesheet" type="text/css" href="../../../css/footer.css" />
		<link rel="stylesheet" type="text/css" href="../kaoqin.css"/>
		<link rel="stylesheet" type="text/css" href="../../../css/swiper-3.4.2.min.css" />
		<script src="../../../js/flexible.min.js" type="text/javascript" charset="utf-8"></script>
		<style type="text/css">
			#content {
				padding-top: 1.3rem;
			}
			body{
				background-color: #F5F5F5;
			}
			
			/*样式*/
			#qingjia{
				display: block;
				height: 20px;
				font-size: 12px;
				position: absolute;
			    right: 0.333333rem;
			    top: 0.3rem;
			    padding: 0.069444rem;
			    border: 1px solid #E93440;
			    border-radius: 0.555555rem;
			    color: #E93440;
			    margin: 0;
			}
			#qingjia:active{
				color: white;
				background-color: #E93440;
			}
			.sh_tab{
				width: 100%;
				height: 1.25rem;
				border-bottom: 1px solid #f4f4f4;
				background-color: #F5F5F5;
			}
			.sh_tab li{
				width: 50%;
				float: left;
			}
			.sh_tab li a{
				display: block;
				width: 99%;
				height: 0.416666rem;
				margin-top: 0.416666rem;
				font-size: 0.416666rem;
				color: black;
				text-align: center;
			}
			.sh_tab li:nth-child(1) a{
				border-right: 1px solid #E8E8E8;
				color: #e83023;;
			}
			.sh_div{
				display: none;
				width: 100%;
				background-color: white;
				border-bottom: 0.013888rem solid #F2F2F2;
				box-shadow: 0.069444rem 0.069444rem 0.069444rem #b3b3b3;
			}
			.sh_div li{
				width: 92.5%;
				margin: 0 auto;
				height: 2.166666rem;
				border-bottom: 1px solid #EDEDED;
			}
			.sh_div li a{
				display: block;
				width: 100%;
				height: 100%;
				color: #7b7a7a;
			}
			.shenhe_l{
				float: left;
				padding-top: 0.583333rem;
			}
			.shenhe_l h4{
				font-size: 0.38rem;
				margin: 0;
				line-height: 0.38rem;
				font-weight: 600;
				color: #000;
			}
			.shenhe_l p{
				margin-top: 0.277777rem;
				font-size: 0.38rem;
			}
			.shenhe_r{
				float: right;
				padding-top: 0.583333rem;
			}
			.shenhe_r h5{
				font-size: 0.38rem;
				margin: 0;
				line-height: 0.416666rem;
				font-weight: 500;
				padding-right: 2em;
				text-align: right;
			    color: #f00;
			}
			.shenhe_r p{
				margin-top: 0.277777rem;
				font-size: 0.38rem;
			}
		</style>
	</head>
	<body>
		<div id="wrap">
			<div id="main">
				<div id="header">
					<a id="headImg" href="javascript:history.go(-1)"><img class="headImg" src="../../../images/12.png" /></a>
					<p id="headTitle" style="font-size: 16px;">请假外出复核</p>
				</div>
				<div id="content">
					<ul class="sh_tab">
						<li>
							<a href="javascript:void(0);">待复核列表</a>
						</li>
						<li>
							<a href="javascript:void(0);">已复核列表</a>
						</li>
					</ul>
					<ul class="sh_div">
						<li>
							<a href="shxq.html">
								<div class="shenhe_l">
									<h4>请假申请</h4>
									<p>马忠阳提交病假申请</p>
								</div>
								<div class="shenhe_r">
									<h5>待复核</h5>
									<p>2017.05.04</p>
								</div>
							</a>
						</li>
						<li>
							<a>
								<div class="shenhe_l">
									<h4>外出申请</h4>
									<p>王元博提交出差申请</p>
								</div>
								<div class="shenhe_r">
									<h5>待复核</h5>
									<p>2017.08.25</p>
								</div>
							</a>
						</li>
						<li>
							<a>
								<div class="shenhe_l">
									<h4>外出申请</h4>
									<p>赵立虹提交出差申请</p>
								</div>
								<div class="shenhe_r">
									<h5>待复核</h5>
									<p>2017.10.12</p>
								</div>
							</a>
						</li>
					</ul>
					<ul class="sh_div">
						<li>
							<a href="fhtg.html">
								<div class="shenhe_l">
									<h4>请假申请</h4>
									<p>孟昱辰提交丧假申请</p>
								</div>
								<div class="shenhe_r">
									<h5>通过</h5>
									<p>2017.05.04</p>
								</div>
							</a>
						</li>
						<li>
							<a href="fhbh.html">
								<div class="shenhe_l">
									<h4>请假申请</h4>
									<p>孟昱辰提交病假申请</p>
								</div>
								<div class="shenhe_r">
									<h5>驳回</h5>
									<p>2017.09.07</p>
								</div>
							</a>
						</li>
						<li>
							<a>
								<div class="shenhe_l">
									<h4>外出申请</h4>
									<p>王东明提交出差申请</p>
								</div>
								<div class="shenhe_r">
									<h5>通过</h5>
									<p>2017.09.25</p>
								</div>
							</a>
						</li>
					</ul>
				</div>
			</div>
			<div id="foot" class="row">
				<a class="foot col-xs-3 col-sm-3" href="../index2.html">
					<img class="footImg" src="../../../images/guanlixuanzhong.png" />
					<p>管理</p>
				</a>
				<a class="foot col-xs-3 col-sm-3" href="../../coalition/colalition.html">
					<img class="footImg" src="../../../images/lianmengchushi.png" />
					<p>联盟</p>
				</a>
				<a class="foot col-xs-3 col-sm-3" href="../../store/store.html">
					<img class="footImg" src="../../../images/11.png" />
					<p>商城</p>
				</a>
				<a class="foot col-xs-3 col-sm-3" href="../../personage/personIndex.html">
					<img class="footImg" src="../../../images/13.png" />
					<p>我的</p>
				</a>
			</div>
		</div>

	</body>
	<script src="../../../js/jquery-2.2.3.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../../js/bootstrap-3.3.7-dist/js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../../js/handlebars-v2.0.0.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../../js/rhAdmin.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		$(function(){
			//color: #e83023;
			$('.sh_tab li').eq(0).children().css("color","#e83023").siblings().children().css("color","black");
			$('.sh_div').eq(0).show();
			$('.sh_tab li').on('touchend',function(){
				var i=$(this).index();
				$('.sh_tab li a').css("color","black");
				$('.sh_tab li').eq(i).children().css("color","#e83023");
				$('#content>.sh_div').hide();
				$('#content>.sh_div').eq(i).show();
			})
			
			loadleave1();
			loadleave2();
		})
		
		function loadleave1(){
			var json = 
			{
				"pageNum":"1",
				"pageSize":"30",
				"checkUser":"sunpengfei",
				"firmId":"zczj",
				"checkStatus":"1",
				"checkStatusTwo":"0"
				
			};
			$.ajax({
				url: "http://10.0.47.157:5555/companyapplyfor-service/leaveGoOut/search",
				type: "GET",
				data: json,
				success: function(data) {
					var html="";
					if(data.code == 1){
						var datas = data.leaveGoOutList.list;
						console.log(datas);
						for(var i=0;i<datas.length;i++){
							html += '<li><a href="shtg.html?'+datas[i].id+'">'
							      + '<div class="shenhe_l">';
							      if(datas.applyforStatus == 0){
							      		html += '<h4>请假申请</h4>';
							      }else{
							      		html += '<h4>外出申请</h4>';
							      }
							html += '<p>'+datas[i].leaveCause+'</p>'
							      + '</div>'
							      + '<div class="shenhe_r">'
								  + '<h5>待审核</h5>'
								  + '<p>'+datas[i].subDate+'</p>'
								  + '</div></a></li>';
								  
						}
						document.getElementById("sh_div1").innerHTML = html;  
					}
				},
				error: function(e) {
					console.log('提交请假申请失败！', e);
				}
			})
		}
		
		function loadleave2(){
			var json = 
			{
				"pageNum":"1",
				"pageSize":"30",
				"checkUser":"lvzheng",
				"firmId":"zczj",
				"checkStatus":"1,-1"
			};
			$.ajax({
				url: "http://10.0.47.157:5555/companyapplyfor-service/leaveGoOut/search",
				type: "GET",
				data: json,
				success: function(data) {
					var html="";
					if(data.code == 1){
						var datas = data.leaveGoOutList.list;
						console.log(datas);
						for(var i=0;i<datas.length;i++){
							html += '<li><a href="../shjg/shtg.html?'+datas[i].id+'">'
							      + '<div class="shenhe_l">';
							      if(datas.applyforStatus == 0){
							      		html += '<h4>请假申请</h4>';
							      }else{
							      		html += '<h4>外出申请</h4>';
							      }
							html += '<p>'+datas[i].leaveCause+'</p>'
							      + '</div>'
							      + '<div class="shenhe_r">';
							if(datas[i].checkStatus == 1){
								html+= '<h5>审核通过</h5>';
							}else{
								html+= '<h5>审核不通过</h5>';
							}
								  
							html += '<p>'+datas[i].subDate+'</p>'
								  + '</div></a></li>';
						}
						document.getElementById("sh_div2").innerHTML = html;  
					}
				},
				error: function(e) {
					console.log('提交请假申请失败！', e);
				}
			})
		}
	</script>

</html>